Part Number Hot Search : 
LC22004A DS250 70XF6T 302U60A SK510C 68030 LM2575 SUR539J
Product Description
Full Text Search
 

To Download EM78862B Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
 EM78862B
8-Bit RISC Type Microprocessor
Product Specification
VERSION 1.1 ELAN MICROELECTRONICS CORP.
March 2005
Specification Revision Chronology
Version 1.0 1.1 Initial version Revised operting temp to -40C ~ 85C Revision Description Date Aug. 02, 2004 Mar. 01, 2005
Trademark Acknowledgments IBM is a registered trademark and PS/2 is a trademark of IBM. Microsoft, MS, MS-DOS, and Windows are registered trademarks of Microsoft Corporation. (c) 2003 ELAN Microelectronics Corporation All Rights Reserved
Printed in Taiwan, ROC, Mar-01-2005 (Version 1.1)
The contents of in this specification are subject to change without notice. ELAN Microelectronics assumes no responsibility for errors that may appear in this specification. ELAN Microelectronics makes no commitment to update, or to keep current, the information contained in this specification. The software (if any) described in this specification is furnished under a license or nondisclosure agreement, and may be used or copied only in accordance with the terms of the agreement. ELAN Microelectronics products are not intended for use in life support appliances, devices, or systems. Use of ELAN Microelectronics product in such applications is not supported and is prohibited. NO PART OF THIS SPECIFICATION MAY BE REPRODUCED OR TRANSMITTED IN ANY FORM OR BY ANY MEANS WITHOUT THE EXPRESS WRITTEN PERMISSION OF ELAN MICROELECTRONICS.
ELAN MICROELECTRONICS CORPORATION
Headquarters: No. 12, Innovation Road 1 Science-based Industrial Park Hsinchu, Taiwan, R.O.C. 30077 Tel: +886 3 563-9977 Fax: +886 3 563-9966 http://www.emc.com.tw Hong Kong: Elan (HK) Microelectronics Corporation, Ltd. Rm. 1005B, 10/F Empire Centre 68 Mody Road, Tsimshatsui Kowloon , HONG KONG Tel: +852 2723-3376 Fax: +852 2723-7780 http://www.elanhk.com.hk USA: Elan Information Technology Group 10062 Miller Ave., Suite 100 Cupertino, CA 95014 USA Tel: +1 048 366-8223 Fax: +1 048 366-8220
Europe: Elan Microelectronics Corp. (Europe) Siewerdtstrasse 105 8050 Zurich, SWITZERLAND Tel: +41 43 299-4060 Fax: +41 43 299-4079 http://www.elan-europe.com
Shenzhen:
Shanghai:
Elan (Shenzhen) Microelectronics Elan Electronics (Shanghai) Corporation, Ltd. Corporation, Ltd. Rm. 420/4Fl., Fuxing Garden Fuxing Rd, Futian Dist., Shenzhen Guandong, CHINA 518031 Tel: +86 755 2601-0565 Fax: +86 755 2601-0500 23/Bldg. 115, Lane 572, Bibo Road Zhangliang Hi-Tech Park Shanghai, CHINA Tel: +86 021 5080-3866 Fax: +86 021 5080-4600
ii
EM78862B Specification
Contents
1 2 General Description................................................................................................ 1 Features ................................................................................................................... 1
2.1 2.2 CPU............................................................................................................................. 1 LCD............................................................................................................................. 2
3 4 5 6
Applications ............................................................................................................ 2 Pin Configurations.................................................................................................. 2
4.1 Pin Description.......................................................................................................... 3
Functional Block Diagram ..................................................................................... 4 Functional Descriptions......................................................................................... 5
6.1 Operational Registers............................................................................................... 5
6.1.1 6.1.2 6.1.3 6.1.4 6.1.5 6.1.6 6.1.7 6.1.8 6.1.9 6.1.10 6.1.11 6.1.12 6.1.13 6.1.14 6.1.15 6.1.16 6.1.17 R0 (Indirect Address Register) ................................................................................... 5 R1 (TCC).................................................................................................................... 5 R2 (Program Counter) ................................................................................................ 5 R3 (Status Register) ................................................................................................... 6 R4 (Register Bank Select Register)............................................................................ 7 R5 (Program Page Select Register) ........................................................................... 7 R6 (Port 6).................................................................................................................. 7 R7 (Port 7).................................................................................................................. 7 R8 (Port 8).................................................................................................................. 8 R9 (Port 9).................................................................................................................. 8 RA (Mode Control Register) ....................................................................................... 8 RB (Reserved)............................................................................................................ 9 RC (2K RAM Address)................................................................................................ 9 RD (2K RAM Data) ..................................................................................................... 9 RE (LCD Driver, WDT Control) ................................................................................... 9 RF (Interrupt Status Register)....................................................................................11 R10 ~ R1F and R20 ~ R3F (General Purpose Register) ...........................................11 A (Accumulator, ACC)................................................................................................11 CONT (Control Register) ...........................................................................................11 IOC5 (Port 5 I/O Control Register)............................................................................ 12 IOC6 (Port 6 I/O Control Register)............................................................................ 12 IOC7 (Port 7 I/O Control Register)............................................................................ 13 IOC8 (Port 8 I/O Control Register)............................................................................ 13 IOC9 (Port 9 I/O Control Register)............................................................................ 13
iii
6.2
Special Purpose Registers..................................................................................... 11
6.2.1 6.2.2 6.2.3 6.2.4 6.2.5 6.2.6 6.2.7
EM78862B Specification
6.2.8 6.2.9
6.2.10
6.2.11
6.2.12
6.2.13
IOCA (2K RAM Bank, Port 8 I/O, Page Control Register, R/W, Default "00000000") ................................................................................................. 13 IOCB (LCD Address, Counter 1 Preset Register) ..................................................... 14 6.2.9.1 Page 0 (LCD Address)................................................................................. 14 6.2.9.2 Page 1 (Counter 1 Preset Register)............................................................. 15 IOCC (LCD Data, Counter 2).................................................................................... 15 6.2.10.1 Page 0 (LCD Data) .................................................................................... 15 6.2.10.2 Page 1 (Counter 2) .................................................................................... 15 IOCD (Pull-High Control Register, R-Option Register).............................................. 15 6.2.11.1 Page 0 (Pull-High Control Register)........................................................... 15 6.2.11.2 Page 1 (R-Option Control Register) ........................................................... 15 IOCE (Port9 GPIO/LCD Segment, Port6 GPIO/LCD Com, LCD Bias Scan Key Signal, Port7 Open Drain, Counter 1/2 Clock Source, Counter1 Pre-Scaler Control Register)..................................................................... 16 6.2.12.1 Page 0 (Port9 GPIO/LCD Segment, Port6 GPIO/LCD Com, LCD Bias, Scan Key Signal Control Register............................................ 16 6.2.12.2 Page 1 (Port 7 Open Drain, Counter 1/2 Clock Source, Counter 1 Pre-Scaler ................................................................................. 18 IOCF (Interrupt Mask Register) ................................................................................ 18
6.3 6.4 6.5 6.6 6.7 6.8
TCC/WDT Pre-Scaler............................................................................................... 19 I/O Ports ................................................................................................................... 20 RESET and Wake-Up .............................................................................................. 20 Oscillator.................................................................................................................. 22 Interrupt ................................................................................................................... 22 LCD Driver ............................................................................................................... 23
6.8.1 6.8.2 LCD Driver Control ................................................................................................... 24 6.8.1.1 LCD Driver, WDT Control (RE) .................................................................. 24 LCD Display Area ..................................................................................................... 25 6.8.2.1 IOCB (LCD RAM Display Address)............................................................ 25 6.8.2.2 IOCC (LCD RAM Display Data) ................................................................. 25 LCD COM and SEG Signal ...................................................................................... 26 LCD Bias Control...................................................................................................... 27 6.8.4.1 IOCE (Bias Control Register)..................................................................... 27
6.8.3 6.8.4
6.9
Code Options........................................................................................................... 28
6.10 Instruction Set ......................................................................................................... 28
7 8 9
Absolute Maximum Ratings ................................................................................ 30 DC Electrical Characteristics .............................................................................. 31 AC Electrical Characteristics .............................................................................. 32
10 Timing Diagram..................................................................................................... 33 11 Application Circuit................................................................................................ 34
11.1 Application with Crystal Mode ............................................................................... 34 11.2 Application with RC Mode...................................................................................... 35
iv EM78862B Specification
EM78862B
8-Bit RISC Type Microprocessor
1
General Description
The EM78862B is an 8-bit RISC type microprocessor with low power, high speed CMOS technology. Integrated into the single chip are on chip watchdog (WDT), RAM, ROM, programmable real-time clock/counter, internal interrupt, power-down mode, LCD driver, and tri-state I/O. The EM78862B provides a single chip solution for designing DATA-BANK of message display. The following table shows how EM78862B compares with other MCU's of the same series.
Item ROM size RAM size LCD LCD RAM Oscillator Code option Pins number OTP EM78862 16K X 13 bit 2.2K X 8 bit 60 X 9 EM78862B 16K X 13 bit 2.2K X 8 bit 60 X 9 EM78869 8K X 13 bit 0.7K X 8 bit 40 X 9
Write only when LCD is enabled. Read/Write when disabled. Crystal MCLK 84 EM78P862A Crystal/RC MCLK/OSCSEL 84 EM78P862A Crystal/RC MCLK/ELCD/OSCSEL 64 EM78P862A
2
Features 2.1 CPU
Operating voltage range: 2.2V ~ 5.5V 16K X 13 on chip ROM 2.2K X 8 on chip RAM Up to 29 bi-directional and tri-state I/O ports 8 level stack for subroutine nesting 8-bit real time clock/counter (TCC) Two sets of 8 bit counters can be interrupt sources Programmable free running on chip watchdog timer Four modes (internal PLL clock 3.579MHz)
* SLEEP Mode: CPU and 3.579MHz clock turn off, 32.768KHz clock turn off * IDLE Mode: CPU and 3.579MHz clock turn off, 32.768KHz clock turn on * GREEN Mode: 3.579MHz clock turn off, CPU and 32.768KHz clock turn on * NORMAL Mode: 3.579MHz clock turn on, CPU and 32.768KHz clock turn on
Input port wake up function Seven interrupt sources; 4 external, 3 internal 84-pin chip (EM78862BH) Port key scan function Clock frequency 32.768KHz or RC mode Eight R-option pins
This specification is subject to change without further notice. Mar.01.2005 (V1.1) 1 of 36
EM78862B
8-Bit RISC Type Microprocessor
2.2 LCD
Software selectable LCD operation voltage Common driver pins: 9 Segment driver pins: 60 1/4 bias 1/8, 1/9 duty
3
Applications
Data Bank Message display box Scientific calculator
4
Pin Configurations
S EG 59/P 97 S EG 58/P 96 S EG 57/P 95 S EG 56/P 94 S EG 55/P 93 S EG 54/P 92 S EG 53/P 91 S EG 52/P 90 S EG 51/P 87 S EG 50/P 86 S EG 49/P 85 S EG 48/P 84 S EG 47/P 83
78 77 76 75
P 73/IN T 3
P 72/IN T 2 P 71/IN T 1
P 70/IN T 0
R ES ET
P 77
P 76 P 75
P 74
PLLC OSCI
3 10
99
98
97
96
95
94
93
92
91
90
89
88
87
86
85
84
83
82
81
80
79
SEG46/P82 SEG45/P81 SEG44/P80 SEG43/P57 SEG42/P56 SEG41/P55 SEG40/P54 P60/COM8 TEST GND SEG39 SEG38 SEG37 SEG36 SEG35 SEG34 SEG33 SEG32 SEG31 SEG30
OSCO VDD COM7 COM6 COM5 COM4 COM3 COM2 COM1 COM0 SEG0 SEG1 SEG2 SEG3 SEG4 SEG5 SEG6
11 12 13 14 15 16 17 18 19 20
74 73 72 71 63
EM78862B
62 61 60 59 58 57
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
56 55 54 53 52 51 50
S EG 7
S EG 8
S EG 9
S EG 11 S EG 10
S EG 12
S EG 13
Fig. 1 EM78862B Pin Configuration for Dice Form 2 of 36
Mar.01.2005 (V1.1) This specification is subject to change without further notice.
S EG 14
S EG 16 S EG 15
S EG 17
S EG 18
S EG 19
S EG 20
S EG 21
S EG 23 S EG 22
S EG 24
S EG 25
S EG 26
S EG 27
S EG 29 S EG 28
EM78862B
8-Bit RISC Type Microprocessor
4.1
VDD GND OSCI OSCO
Pin Description
Pin Name Pin # 12 61 10 11 I/O Type Power Power I O O O O I I I/O I/O Description Digital power and analog power Digital and analog ground Input pin for 32.768 KHz oscillator or installing a resistor for RC mode Output pin for 32.768 KHzoscillator Common driver pins of LCD driver Segment driver pins of LCD driver Segment driver pins of LCD driver Phase loop lock capacitor. Connect a capacitor 0.01u to 0.047u with GND PORT 7 (0) ~ PORT 7 (3) Interrupt Signals ( FALLING EDGE ) PORT 5 (INPUT or OUTPUT port per bit). Shared with LCD segment signals PORT 6 (INPUT or OUTPUT port per bit). Shared with LCD common signals PORT 7 (INPUT or OUTPUT port per bit). Internal Pull high function Key scans function PORT 8 (INPUT or OUTPUT port per bit) Shared with LCD segment signals PORT 9 (INPUT or OUTPUT port per bit) "And" can be set as wake-up watchdog timer "And" is shared with Segment signal Test pin during test mode only. Normally low System reset pin ( LOW ACTIVE )
COM0 ~ COM7, COM8 20 ~ 13, 63 SEG0 ~ SEG39 SEG40 ~ SEG59 PLLC INT0 ~ INT3 P5.4 ~ P5.7 P6.0 21 ~ 60 71 ~90 3 91 ~ 94 71 ~ 74 63
P7.0 ~ P7.7
91 ~ 98
I/O
P8.0 ~ P8.7
75 ~ 82
I/O
P9.0 ~ P9.7 TEST RESET
83 ~ 90 62 99
I/O I I
This specification is subject to change without further notice.
Mar.01.2005 (V1.1) 3 of 36
EM78862B
8-Bit RISC Type Microprocessor
5
Functional Block Diagram
CPU CPU
RAM RAM
TIMING CONTROL TIMING CONTROL
LCD DRIVER LCD DRIVER
LCD
TIMER TIMER
IO PORT IO PORT
I/O
ROM ROM
PLL PLL
Fig. 2a System Overview Block Diagram
Xin Xout RC WDT Timer Oscillato Timing rControl R1(TCC) Control Sleep & Wake-up on I/O Port General RAM R4 Prescaler Interruption Control Instruction Register R3 R5 ALU ROM R2 Stack
ACC
Instruction Decoder
Data & Control Bus
RAM PORT5 IOC5 R5 PORT6 IOC6 R6 PORT7 IOC7 R7 PORT8 IOC8 R8 PORT9 IOC9 R9
P54~P57
P60
P70~P77
P80~P87
P90~P97
Fig. 2b System Functional Block Diagram
4 of 36
Mar.01.2005 (V1.1)
This specification is subject to change without further notice.
EM78862B
8-Bit RISC Type Microprocessor
6
Functional Descriptions
6.1 Operational Registers
6.1.1 R0 (Indirect Address Register)
R0 is not a physically implemented register. It is useful as indirect addressing pointer. Any instruction using R0 as register actually accesses data pointed by the RAM Select Register (R4).
6.1.2 R1 (TCC)
Increased by an external signal(16.384KHz or RC/2) , or by the instruction cycle clock. Written and read by the program as any other register.
6.1.3 R2 (Program Counter)
The structure is depicted in Fig. 3 below. Generates 16K x 13 on-chip ROM addresses to the relative programming instruction codes. "JMP" instruction allows the direct loading of the low 10 program counter bits. "CALL" instruction loads the low 10 bits of the PC and PC+1, then push into the STACK (14 bits). "RET'' ("RETL k," "RETI") instruction loads the program counter with the contents at the top of stack. "MOV R2, A" allows the loading of an address from the A register to the PC, and the 9th and 10th bits are cleared to "0''. "ADD R2, A" allows a relative address be added to the current PC, and contents of the ninth and tenth bits are cleared to "0''. "TBL" allows a relative address to be added into the current PC, and its 9th and 10th bits content do not change. The most significant bit (A10~A13) will be loaded into the status register (R5) with the contents of bits PS0~PS3 upon execution of a "JMP,'' "CALL," "MOV R2, A,'' "ADD R2, A,'' or "TBL" instruction.
Fig. 3 Program Counter Organization
This specification is subject to change without further notice. Mar.01.2005 (V1.1) 5 of 36
EM78862B
8-Bit RISC Type Microprocessor
Fig. 4 Data Memory Configuration
6.1.4 R3 (Status Register)
Bit 7 - Bit 6 PAGE Bit 5 0 Bit 4 T Bit 3 P Bit 2 Z Bit 1 DC Bit 0 C
Bit 0: (C) Carry flag Bit 1: (DC) Auxiliary carry flag Bit 2: (Z) Zero flag Bit 3: (P) Power down bit. Set to 1 during power on or by a "WDTC" command and reset to 0 by a "SLEP" command. Bit 4: (T) Time-out bit. Set to 1 by the "SLEP" and "WDTC" command or during power up; and reset to 0 by WDT timeout.
Event WDT wake-up from sleep mode WDT time out (not sleep mode) RESET wake up from sleep Power up Low pulse on RESET pin T 0 0 1 1 X P 0 1 0 1 X Remark
Low active X =Don't care
Bit 5: Unused, fixed at "0" Bit 6: (PAGE) Change IOCB ~ IOCE to another page, 0/1 => page0 / page1 Bit 7: Unused
6 of 36
Mar.01.2005 (V1.1)
This specification is subject to change without further notice.
EM78862B
8-Bit RISC Type Microprocessor
6.1.5 R4 (Register Bank Select Register)
Bit 7 RBK1 Bit 6 RBK0 Bit 5 FSR5 Bit 4 FSR4 Bit 3 FSR3 Bit 2 FSR2 Bit 1 FSR1 Bit 0 FSR0
Bits 0 ~ 5: Used to select up to 32 registers in indirect address mode of each bank Bits 6 ~ 7: Determine which bank is activated among the 4 banks Refer to Fig. 4; Data Memory Configuration (previous page) for configuration of the data memory
6.1.6 R5 (Program Page Select Register)
Bit 7 R57 Bit 0 ~ 3: Bit 6 R56 Bit 5 R55 Bit 4 R54 Bit 3 PS3 Bit 2 PS2 Bit 1 PS1 Bit 0 PS0
(PS0 ~ PS3) Page select bits as shown below:
PS3 0 0 0 1 1 PS2 0 0 0 :: 1 1 1 1 0 1 PS1 0 0 1 PS0 0 1 0 Program Memory Page (Address) Page 0 Page 1 Page 2 :: Page 14 Page 15
You can use PAGE instruction to change and maintain program page. Otherwise, use far jump (FJMP) or far call (FCALL) MACRO instructions to program user's code. ELAN's complier supports program page maintenance and can change your program by inserting instructions within its program. Bit 4 ~ 7: 4-bit I/O registers of Port 5
6.1.7 R6 (Port 6)
Bit 7 Bit 0: Bit 1 ~ 7: Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 R60
(R60) Port 6, single bit (Bit 0) I/O register Unused
6.1.8 R7 (Port 7)
Bit 7 R77 Bit 0 ~ 7: Bit 6 R76 Bit 5 R75 Bit 4 R74 Bit 3 R73 Bit 2 R72 Bit 1 R71 Bit 0 R70
Port 7 8-bit I/O registers
This specification is subject to change without further notice.
Mar.01.2005 (V1.1) 7 of 36
EM78862B
8-Bit RISC Type Microprocessor
6.1.9 R8 (Port 8)
Bit 7 R87 Bit 6 R86 Bit 5 R85 Bit 4 R84 Bit 3 R83 Bit 2 R82 Bit 1 R81 Bit 0 R80
Bit 0 ~ 7: Port 8 8-bit I/O registers
6.1.10 R9 (Port 9)
Bit 7 R97 Bit 6 R96 Bit 5 R95 Bit 4 R94 Bit 3 R93 Bit 2 R92 Bit 1 R91 Bit 0 R90
Bit 0 ~ 7: Port 9 8-bit I/O registers
6.1.11 RA (Mode Control Register)
Bit 7 IDLE Bit 3: Bit 4: Bit 5: Bit 6: Bit 6 PLLEN Bit 5 0 Bit 4 1 Bit 3 0 Bit 2 Bit 1 Bit 0 -
Bit 0 ~ 2: Unused Reserved. Clear this bit to `0.' Reserved. Always `1.' Reserved. Clear this bit to '0'. (Read/Write) PLL enable signal 0: Disable PLL 1: Enable PLL The relation between 32.768K and 3.579M (X'TAL) is explained in Fig. 5 below.
Fig. 5 The Relation between 32.768KHz and 3.579MHz Bit 7: (IDLE) Sleep mode selection bit. This bit defines which SLEP instruction is to be executed. 0: Sleep mode 1: Idle mode When Sleep mode is defined, program is re-activated by Watch Dog time-out or Port 9 signal input and resume running from the "Start vector" (0H). When Idle mode is defined, program is re-activated by TCC clock or Watch Dog time-out, or by Port 9, 7.0 ~ 7.3 signal input. Program will continue running from the instruction that follows the "SLEP" instruction.
8 of 36
Mar.01.2005 (V1.1) This specification is subject to change without further notice.
EM78862B
8-Bit RISC Type Microprocessor
Wakeup Signal
SLEEP Mode RA(7,6)=(0,0) + SLEP
IDLE Mode RA(7,6)=(1,0) + SLEP Wake-up + Interrupt + Next instruction Wake-up + Next instruction Wake-up + Next instruction Wake-up + Interrupt + Next instruction
GREEN Mode RA(7,6)=(x,0) no SLEP Interrupt RESET X Interrupt
NORMAL Mode RA(7,6)=(x,1) no SLEP Interrupt RESET X Interrupt
TCC Time-Out WDT Time-Out Port 9 Port 7.0 ~ 7.3
X RESET RESET X
NOTES: P7.0 ~ P7.3 wake-up function is controlled by IOCF (1, 2, 3, 7) and ENI instruction. P7.0 wakeup signal is a RISING or FALLING signal defined by CONT register Bit 7. Port 9, Port 7.1, Port 7.2, and Port 7.3 wake-up signals are a FALLING EDGE signal. X=Don't care
6.1.12 RB (Reserved)
Bit 7 1 Bit 6 1 Bit 5 1 Bit 4 1 Bit 3 1 Bit 2 1 Bit 1 1 Bit 0 1
Bit 0 ~ 7: Reserved. Set Bit 7 to Bit 0 to `1'
6.1.13 RC (2K RAM Address)
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 RAM_A7 RAM_A6 RAM_A5 RAM_A4 RAM_A3 RAM_A2 RAM_A1 RAM_A0 Bit 0 ~ 7: Select data bank RAM address of up to 256. IOCA is the register for bank selection.
6.1.14 RD (2K RAM Data)
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 RAM_D7 RAM_D6 RAM_D5 RAM_D4 RAM_D3 RAM_D2 RAM_D1 RAM_D0 Bit 0 ~ 7: 2K bytes RAM data transfer register
NOTE Refer to Section 6.2.8; IOCA Register on how to select RAM bank.
6.1.15 RE (LCD Driver, WDT Control)
Bit 7 0 Bit 0: Bit 6 WDTE Bit 5 WUP9H Bit 4 WUP9L Bit 3 0 Bit 2 LCD_C2 Bit 1 LCD_C1 Bit 0 LCD_M
(LCD_M) LCD_M defines the LCD control methods, including duty (see table next page).
This specification is subject to change without further notice.
Mar.01.2005 (V1.1) 9 of 36
EM78862B
8-Bit RISC Type Microprocessor
Bit 1~2: (LCD_C#) Defines LCD display mode; enable, disable, or blanking (see following table).
LCD_C2 0 0 0 0 1 1 1 1 LCD_C1 0 0 1 1 0 0 1 1 LCD_M 0 1 0 1 0 1 0 1 LCD Display Control Change duty Disable (turn off LCD) Blanking Blanking (Don't care) (Don't care) LCD display enable LCD display enable Duty 1/9 1/8 1/9 1/8 1/9 1/8 1/9 1/8 Bias 1/4 1/4 1/4 1/4 1/4 1/4 1/4 1/4
Bit 3: Bit 4:
Reserved. Clear this bit to `0'. (WUP9L) Port 9 low nibble Wake-Up Enable. Use to enable the low nibble wake-up function in Port 9. 0: Disable 1: Enable (WUP9H) Port 9 high nibble Wake-Up Enable. Use to enable the high nibble wake-up function in Port 9. 0: Disable 1: Enable (WDTE = Watch Dog Timer Enable) Control bit is used to enable Watchdog timer. The relation between Bit 4 to Bit 6 is illustrated in Fig. 6 below. 0: Disable 1: Enable
Bit 5:
Bit 6:
Bit 7:
Reserved. Clear this bit to `0'
Fig. 6 Wake-up Function and Control Signal 10 of 36
Mar.01.2005 (V1.1) This specification is subject to change without further notice.
EM78862B
8-Bit RISC Type Microprocessor
6.1.16 RF (Interrupt Status Register)
Bit 7 INT3 Bit 6 0 Bit 5 C8_2 Bit 4 C8_1 Bit 3 INT2 Bit 2 INT1 Bit 1 INT0 Bit 0 TCIF
Bit 0: (TCIF) TCC timer overflow interrupt flag. Set when TCC timer overflows. Bit 1: (INT0) External INT0 pin interrupt flag Bit 2: (INT1) External INT1 pin interrupt flag Bit 3: (INT2) External INT2 pin interrupt flag Bit 4: (C8_1) Internal 8 bit counter interrupt flag Bit 5: (C8_2) Internal 8 bit counter interrupt flag Bit 6: Unused. Clear to `0.' Bit 7: (INT3) External INT3 pin interrupt flag
NOTE 1. "1" means interrupt request; "0" means non-interrupt 2. Refer to Section 6.7 (Interrupt) for reference on high to low edge trigger 3. IOCF is the interrupt mask register. You can read and clear this register.
6.1.17 R10 ~ R1F and R20 ~ R3F (General Purpose Register)
R10 ~ R1F & R20 ~ R3F (Banks 0~3) are general-purpose registers.
6.2
Special Purpose Registers
6.2.1 A (Accumulator, ACC)
Internal data transfer, or instruction operand holding. This is not an addressable register.
6.2.2 CONT (Control Register)
Bit 7 INT_EDGE Bit 6 INT Bit 5 TS Bit 4 Bit 3 PAB Bit 2 PSR2 Bit 1 PSR1 Bit 0 PSR0
Bit 0 ~ 2: (PSR0 ~ PSR2) TCC/WDT pre-scaler bits
PSR2 0 0 0 0 1 1 1 1 PSR1 0 0 1 1 0 0 1 1 PSR0 0 1 0 1 0 1 0 1 TCC Rate 1:2 1:4 1:8 1:16 1:32 1:64 1:128 1:256 WDT Rate 1:1 1:2 1:4 1:8 1:16 1:32 1:64 1:128
This specification is subject to change without further notice.
Mar.01.2005 (V1.1)11 of 36
EM78862B
8-Bit RISC Type Microprocessor
Bit 3: (PAB) Pre-scaler assignment bit 0: For TCC use 1: For WDT use Bit 4: Unused Bit 5: (TS) TCC signal source 0: Internal instruction cycle clock 1: 16.384KHz or RC/2 (in RC mode) Bit 6: (INT):INT enable flag. This bit is read only 0: Interrupt masked by DISI or hardware interrupt 1: Interrupt enabled by ENI/RETI instruction Bit 7: INT_EDGE 0: P7.0 (INT0) interrupt source is a rising edge signal 1: P7.0 (INT0) interrupt source is a falling edge signal
NOTE CONT is a readable and writable register.
6.2.3 IOC5 (Port 5 I/O Control Register)
Bit 7 IOC57 Bit 0: Bit 6 IOC56 Bit 5 IOC55 Bit 4 IOC54 Bit 3 0 Bit 2 0 Bit 1 0 Bit 0 P5S
P5S is switch register for I/O port or LCD signal switching. 0: Select normal I/O port 1: Select SEG40~SEG43 output as LCD SEGMENT output Unused. Unused. Unused.
Bit 1: Bit 2: Bit 3:
Bit 4 ~ 7: Port 5 I/O direction control registers 0: Set the relative I/O pin as output 1: Set the relative I/O pin into high impedance
6.2.4 IOC6 (Port 6 I/O Control Register)
Bit 7 0 Bit 0: Bit 6 0 Bit 5 0 Bit 4 0 Bit 3 0 Bit 2 0 Bit 1 0 Bit 0 IOC60
(IOC60) Port 6 I/O direction control register 0: Set the relative I/O pins as output 1: Set the relative I/O pin into high impedance
Bit 2 ~ 7 Unused. Clear to `0'
NOTE Refer to Section 6.2.12, IOCE (Bit 5) Register on how to switch Port 6 to normal I/O port.
12 of 36
Mar.01.2005 (V1.1)
This specification is subject to change without further notice.
EM78862B
8-Bit RISC Type Microprocessor
6.2.5 IOC7 (Port 7 I/O Control Register)
Bit 7 IOC77 Bit 6 IOC76 Bit 5 IOC75 Bit 4 IOC74 Bit 3 IOC73 Bit 2 IOC72 Bit 1 IOC71 Bit 0 IOC70
Bit 0 ~ 7: (IOC70 ~ IOC77) Port 7 I/O direction control register 0: Set the relative I/O pins as output 1: Set the relative I/O pin into high impedance
6.2.6 IOC8 (Port 8 I/O Control Register)
Bit 7 IOC87 Bit 6 IOC86 Bit 5 IOC85 Bit 4 IOC84 Bit 3 IOC83 Bit 2 IOC82 Bit 1 IOC81 Bit 0 IOC80
Bit 0 ~ 7: (IOC80 ~ IOC87) Port 8 I/O direction control register 0: Set the relative I/O pins as output 1: Set the relative I/O pin into high impedance
NOTE Refer to Section 6.2.8, IOCA (Bit6/7) Register below on how to switch Port 8 to normal I/O port.
6.2.7
Bit 7 IOC97
IOC9 (Port 9 I/O Control Register)
Bit 6 IOC96 Bit 5 IOC95 Bit 4 IOC94 Bit 3 IOC93 Bit 2 IOC92 Bit 1 IOC91 Bit 0 IOC90
Bit 0 ~7: (IOC90 ~ IOC97) Port 9 I/O direction control register 0: Set the relative I/O pins as output 1: Set the relative I/O pin into high impedance
NOTE Refer to Section 6.2.12, IOCE (Bit6/7) Register on how to switch Port 9 to normal I/O port.
6.2.8 IOCA (2K RAM Bank, Port 8 I/O, Page Control Register, R/W, Default "00000000")
Bit 7 P8SH Bit 6 P8SL Bit 5 0 Bit 4 0 Bit 3 Bit 2 Bit 1 RAMBK2 RAMBK1 RAMBK0 Bit 0 0
Bit 0: Unused. Clear to `0' Bit 1 ~ 3: (RAMBK0 ~ RAMBK2) Select 640 bytes RAM bank.
RAMBK_2 0 0 0 0 1 1 1 1 RAMBK_1 0 0 1 1 0 0 1 1 RAMBK_0 0 1 0 1 0 1 0 1 Note (Total Size) RAM BANK0 (256 Bytes) RAM BANK1 (256 Bytes) RAM BANK2 (256 Bytes) RAM BANK3 (256 Bytes) RAM BANK4 (256 Bytes) RAM BANK5 (256 Bytes) RAM BANK6 (256 Bytes) RAM BANK7 (256 Bytes)
Mar.01.2005 (V1.1)13 of 36
This specification is subject to change without further notice.
EM78862B
8-Bit RISC Type Microprocessor
Bit 4 ~ 5: Unused. Clear the bits to `0' Bit 6: (P8SL) Port 8 low nibble switch 0: Normal I/O port 1: Segment output Bit 7: (P8SH) Port 8 high nibble switch 0: Normal I/O port 1: Segment output
6.2.9 IOCB (LCD Address, Counter 1 Preset Register)
6.2.9.1 Page 0 (LCD Address) Bit 7 0 Bit 6 LCDA6 Bit 5 LCDA5 Bit 4 LCDA4 Bit 3 LCDA3 Bit 2 LCDA2 Bit 1 LCDA1 Bit 0 LCDA0
Bit 0 ~ 6: (LCDA0~LCDA6) LCD address The LCD display data is stored in the data RAM. The relation between data area and COM/SEG pin is as follows:
SEGMENT SEG 0 SEG 1 : : SEG 38 SEG 39 Unused Unused Unused SEGMENT SEG 0 SEG 1 : : SEG 58 SEG 59 Unused : X : 7AH 7BH 7CH : IOCC(COM 8) 3AH 3BH 3CH : 3FH IOCB(Address) 40H 41H 1/9 DUTY Remarks IOCC (COM7 ~ COM0) IOCB (Address) 00H 01H 1/8 DUTY Remarks
Bit 7: Unused. Fixed at `0'.
NOTE Writable only when LCD is enabled. Read/Write when disabled.
14 of 36
Mar.01.2005 (V1.1)
This specification is subject to change without further notice.
EM78862B
8-Bit RISC Type Microprocessor
6.2.9.2 Page 1 (Counter 1 Preset Register) Bit 7 C1D7 Bit 6 C1D6 Bit 5 C1D5 Bit 4 C1D4 Bit 3 C1D3 Bit 2 C1D2 Bit 1 C1D1 Bit 0 C1D0
Bit 0 ~ 7: (C1D0~C1D7) 8 bit up counter (COUNTER1) preset and read out register (write = preset ). After an interruption, it will count from "0".
6.2.10 IOCC (LCD Data, Counter 2)
6.2.10.1 Page 0 (LCD Data) Bit 7 LCDD7 Bit 6 LCDD6 Bit 5 LCDD5 Bit 4 LCDD4 Bit 3 LCDD3 Bit 2 LCDD2 Bit 1 LCDD1 Bit 0 LCDD0
Bit 0 ~ 7: (LCDD0~LCDD7) LCD RAM data register 6.2.10.2 Page 1 (Counter 2) Bit 7 C2D7 Bit 6 C2D6 Bit 5 C2D5 Bit 4 C2D4 Bit 3 C2D3 Bit 2 C2D2 Bit 1 C2D1 Bit 0 C2D0
Bit 0 ~ 7: (C2D0~C2D7) 8 bit up-counter (COUNTER2) preset and read out register (Write = preset). After an interruption, it will count from "00".
6.2.11 IOCD (Pull-High Control Register, R-Option Register)
6.2.11.1 Page 0 (Pull-High Control Register) Bit 7 PH77 Bit 6 PH76 Bit 5 PH75 Bit 4 PH74 Bit 3 PH73 Bit 2 PH72 Bit 1 PH71 Bit 0 PH70
Bit 0 ~ 7: (PH70~PH77) Control bit is used to enable the pull-high of Port 7 (#) pin. 0: Disable internal pull-high register 1: Enable internal pull-high register 6.2.11.2 Page 1 (R-Option Control Register) Bit 7 RO7 Bit 6 RO6 Bit 5 RO5 Bit 4 RO4 Bit 3 RO3 Bit 2 RO2 Bit 1 RO1 Bit 0 RO 0
Bit 0 ~ 7: (RO0~RO7) Control bit is used to enable the R-Option of Port 9.0 ~ Port 9.7 pins. 0: Disable R-Option 1: Enable R-Option RO is used for R-OPTION. Setting RO to `1' will enable the status of R-option pin (P9.0 ~ P9.7) to read by controller. Clearing RO will disable R-option function. If the R-option function is used, you must connect the PORT9 pin to GND by 560K external registers. If the register is connected/disconnected, the R9 will read as " 0/1" when RO is set to `1'.
This specification is subject to change without further notice.
Mar.01.2005 (V1.1)15 of 36
EM78862B
8-Bit RISC Type Microprocessor
6.2.12 IOCE (Port9 GPIO/LCD Segment, Port6 GPIO/LCD Com, LCD Bias, Scan Key Signal, Port7 Open Drain, Counter 1/2 Clock Source, Counter1 Pre-Scaler Control Register)
6.2.12.1 Page 0 (Port9 GPIO/LCD Segment, Port6 GPIO/LCD Com, LCD Bias, Scan Key Signal Control Register) Bit 7 P9SH Bit 6 P9SL Bit 5 P6S Bit 4 BIAS3 Bit 3 BIAS2 Bit 2 BIAS1 Bit 1 0 Bit 0 SC
Bit 0: (SC) Scan key signal. 0: Disable scan key signal 1: Enable scan key signal Once you enable this bit, all of the LCD signal will have a low pulse during a common period. This pulse has 30s width. Use the following procedures to implement the key scans function: a) b) c) d) Set Port7 as input port Set IOCD Page 0 Port 7 to pull high Enable scan key signal Once a key is pressed, set RA (6)=1, and switch to normal mode
e) Blank LCD. Disable scan key signal f) Set P9SL = 0, P9SH = 0. Port 9 sent probe signal to Port 7 and read Port 7 to get the key. Note that a probe signal instruction delay will occur before the next instruction is performed. g) Set P9SH = 1, P9SL =1. Define Port 9 as LCD signal and enable LCD.
NOTE This procedure is also applicable to Port 6 and Port 8.
P93 P92 P91 P90
KEY5
KEY1 KEY2 KEY3 KEY4
P73
P72
P71
P70
Fig. 7 Key Scans Circuit 16 of 36
Mar.01.2005 (V1.1) This specification is subject to change without further notice.
EM78862B
8-Bit RISC Type Microprocessor
Com2
vdd v1 v2 v3 vlcd Gnd vdd v1 v2 v3 vlcd Gnd
Seg
30us
Fig. 8 Key Scan Signal
Bit 1:
Port 7 PULL HIGH register option. Use default value.
Bit 2 ~ 4: (BIAS1~BIAS3) Control bits are used to choose LCD operation voltage.
BIAS3 0 0 0 0 1 1 1 1 BIAS2 0 0 1 1 0 0 1 1 BIAS1 0 1 0 1 0 1 0 1 Ratio 0.60 VDD 0.66 VDD 0.74 VDD 0.82 VDD 0.87 VDD 0.93 VDD 0.96 VDD 1.00 VDD LCD Vop (VDD=5V) 3.0V 3.3V 3.7V 4.0V 4.4V 4.7V 4.8V 5.0V
Bit 5:
(P6S) Port 6 switch 0: Normal I/O port 1: Common output of LCD (P9SL) Port 9 low nibble switch 0: Normal I/O port 1: Segment output of LCD (P9SH) Port 9 high nibble switch 0: Normal I/O port 1: Segment output of LCD
Bit 6:
Bit 7:
This specification is subject to change without further notice.
Mar.01.2005 (V1.1)17 of 36
EM78862B
8-Bit RISC Type Microprocessor
6.2.12.2 Page 1 (Port 7 Open Drain, Counter 1/2 Clock Source, Counter 1 Pre-Scaler) Bit 7 OP77 Bit 0: Bit 1: Bit 6 OP76 Unused. Unused. Bit 5 C2S Bit 4 C1S Bit 3 PSC1 Bit 2 PSC0 Bit 1 0 Bit 0 0
Bit 2 ~ 3: (PSC0~PSC1) Counter1 prescaler, reset=(0,0)
PSC1 0 0 1 1 PSC0 0 1 0 1 Counter 1 Rate 1:1 1:4 1:8 Reserved
Bit 4:
(C1S) Counter 1 source. 0: 32768Hz / RC 1: 3.579MHz, if enable PLL (Crystal mode)
Bit 5:
(C2S) Counter 2 source. Scale=1:1 0: 32768Hz / RC 1: 3.579MHz, if enable PLL (Crystal mode) (OP76) P76 open-drain control 0: Disable 1: Enable (OP77) P77 open-drain control 0: Disable 1: Enable
Bit 6:
Bit 7:
6.2.13 IOCF (Interrupt Mask Register)
Bit 7 INT3 Bit 6 0 Bit 5 C8_2 Bit 4 C8_1 Bit 3 INT2 Bit 2 INT1 Bit 1 INT0 Bit 0 TCIF
Bit 0 ~ 5, & Bit7: Interrupt enable bit. 0: Disable interrupt 1: Enable interrupt Bit 6: Reserved. Clear the bit to `0'
NOTE IOCF Register is readable and writable.
18 of 36
Mar.01.2005 (V1.1)
This specification is subject to change without further notice.
EM78862B
8-Bit RISC Type Microprocessor
6.3
TCC/WDT Pre-Scaler
An 8-bit counter is available as pre-scaler for the TCC or WDT. The pre-scaler is available only to either the TCC or WDT at a time. An 8-bit counter is available for TCC or WDT as determined by the status of Bit 3 (PAB) of CONT register. The pre-scaler ratio is described in Section 6.2.2 CONT (Control Register). The TCC/WDT circuit diagram is shown in Fig. 9 below. Both TCC and pre-scaler are cleared by instructions. The pre-scaler will be cleared by the WDTC and SLEP instructions when running in WDT mode. However, pre-scaler will not be cleared by SLEP instruction when running in TCC mode.
CLK(=Fosc/2)
0
16.38KHz or RC/2
Data Bus
1 0
SYNC 2 Cycles
TCC(R1)
1
OSCSEL
0
TS
PAB
TCC Overflow Interrupt
WDT
1
8-BIT Counter
PAB WDTE
8-to-1 MUX
0 1
PSR0~PSR2 PAB
MUX
WDT Timeout
Fig. 9 TCC WDT Block Diagram
This specification is subject to change without further notice.
Mar.01.2005 (V1.1)19 of 36
EM78862B
8-Bit RISC Type Microprocessor
6.4
I/O Ports
The I/O registers, (Port 5, Port 6, Port 7, Port 8, and Port 9), are bi-directional tri-state I/O ports. Port 7 can be pulled-high internally by software. Furthermore, P7.6 and P7.7 has its open-drain output also defined through software. Port 9 features an input status changed wake-up function. Each I/O pin can be defined as "input" or "output" pin by the I/O control register (IOC5 ~ IOC9). The I/O registers and I/O control registers are both readable and writable. The I/O interface circuits are shown in Fig. 10 below.
NOTE: Open-drain is not shown in the figure.
Fig. 10 Port 5, Port 6, Port 7, & Port 8 I/O Port and I/O Control Register Circuit
6.5
RESET and Wake-up
RESET will occur during any of the following conditions: Power on reset WDT timeout (if WDT is enabled during SLEEP, GREEN, or NORMAL mode) Port 9 wake-up (if WUP9H or WUP9L is enabled during SLEEP mode) RESET pin pull low Once a RESET occurs, the following functions are performed: The oscillator will continue running The Program Counter (R2) is set to all "0" All I/O port pins are configured to input mode (high-impedance state) The TCC/Watchdog timer and pre-scaler are cleared The Watchdog timer is disabled When power is switched on, the upper 3 bits of R3 and the upper 2 bits of R4 are cleared The bits of the CONT register are set to all "1"
20 of 36
Mar.01.2005 (V1.1)
This specification is subject to change without further notice.
EM78862B
8-Bit RISC Type Microprocessor
For other registers (Bit7 & Bit 0), refer below:
R5 = PORT R6 = PORT R7 = PORT R8 = PORT R9 = PORT RA = "x00x0xxx RB = "11111111" RC = "00000000" RD = "xxxxxxxx" RE = "00000000" RF = "00000000" IOC5 = "11110000" IOC6 = "11111111" IOC7 = "11111111" IOC8 = "11111111" IOC9 = "11111111" IOCA = "00000000" Page0 IOCB = "00000000" Page0 IOCC = "0xxxxxxx" Page0 IOCD = "00000000" Page0 IOCE = "00000000" IOCF = "00000000" Page1 IOCB = "00000000" Page1 IOCC = "00000000" Page1 IOCD = "00000000" Page1 IOCE = "00000000"
The controller can be awakened from Sleep mode and Idle mode. The wake-up signals are listed below.
Sleep Mode Wake-Up Signal RA(7,6)=(0,0) + SLEP X Idle Mode RA(7,6)=(1,0) + SLEP Wake-up + Interrupt + Next instruction Wake-up + Interrupt + Next instruction Wake-up + Interrupt + Next instruction Wake-up + Interrupt + Next instruction Wake-up + Interrupt + Next instruction Wake-up + Next instruction Wake-up+ next instruction Green Mode RA(7,6)=(x,0) No SLEP Interrupt Normal Mode RA(7,6)=(x,1) No SLEP Interrupt
TCC time out IOCF Bit0=1 INT0 pin IOCF Bit1=1 INT1 pin IOCF Bit2=1 INT2 pin IOCF Bit3=1 INT3 pin IOCF Bit7=1 Port9 (input status change wake-up) WDT time out
X
Interrupt
Interrupt
X
Interrupt
Interrupt
X
Interrupt
Interrupt
X
Interrupt
Interrupt
RESET
X
X
RESET
RESET
RESET X=No function
This specification is subject to change without further notice.
Mar.01.2005 (V1.1)21 of 36
EM78862B
8-Bit RISC Type Microprocessor
6.6
Oscillator
The oscillator system is used to generate the device clock. The oscillator system is composed of an RC or crystal oscillator and a PLL oscillator as shown in the diagram below.
NOTE: Under RC oscillator mode, the pull-up resistor that connects to OSCI pin and OSC0 pin should be floating. Under 32768Hz crystal oscillator mode, the crystal is connected between OSCI pin and OSCO pin. A 20~30pF capacitor should be connected between each of the pins and ground. In Crystal mode, if the RA (Bit 6)=1, the system clock frequency can be tuned to 3.579MHz. The initial value of OSCSEL bit is fixed at `1' (crystal oscillator). Fig. 11 Oscillator and PLL Function Block.
6.7
Interrupt
The EM78862B IC has two types internal interrupts which are falling edge triggered: TCC timer overflow interrupt (internal) Two 8-bit counters overflow interrupt If these interrupt sources change signal from high to low, the RF register will generate '1' flag to corresponding register if IOCF register is enabled. RF is the interrupt status register which records the interrupt request in flag bit. IOCF is the interrupt mask register. Global interrupt is enabled by ENI instruction and is disabled by DISI instruction. When one of the interrupts (when enabled) is generated, it will cause the next instruction to be fetched from address 008H. Once in the interrupt service routine, the source of the interrupt can be determined by polling the flag bits in the RF register.
NOTE The interrupt flag bit must be cleared in software before leaving the interrupt service routine in order to prevent and avoid recursive interrupts.
There are four external interrupt pins, i.e., INT0, INT1, INT2, & INT3, and three internal interrupts available: External interrupt signals (INT0, INT1, INT2, and INT3) are from Port 7 Bit 0 to Bit 3. If IOCF is enabled, then these signals will activate interrupt. Otherwise, these signals will be treated as general input data. Internal signals include TCC, CNT1, and CNT2.
22 of 36
Mar.01.2005 (V1.1)
This specification is subject to change without further notice.
EM78862B
8-Bit RISC Type Microprocessor
After reset, the next instruction will be fetched from Address 000H and the hardware interrupt is 008H. After timeout, TCC will go to Address 008H when in GREEN mode or NORMAL mode. When in SLEEP mode, TCC will run the next instruction after "SLEP" instruction. These two conditions will set a RF flag.
NOTE It is very important to save ACC, R3 and R5 when processing an interruption as illustrated below:
Address 0x08 0x09 0x0A 0x0B 0x0C 0x0D 0x0E : : : : : : : : DISI MOV SWAP SWAPA MOV MOV MOV : : MOV MOV SWAPA MOV SWAPA RETI
Instruction A_BUFFER, A A_BUFFER 0x03 R3_BUFFER, A A, 0x05 R5_BUFFER, A
Remarks ; Disable interrupt ; Save ACC ; Save R3 status ; Save ROM page register
A, R5_BUFFER 0X05,A R3_BUFFER 0X03,A A_BUFFER
; Return R5 ; Return R3 ; Return ACC
6.8
LCD Driver
The data bank IC can drive LCD directly and has 60 segments and 9 commons that can drive a total of 60*9 dots. LCD block is made up of LCD driver; display RAM, segment output pins, common output pins, and LCD operating power supply pins. Duty, bias, the number of segment, the number of common and frame frequency are determined by LCD mode register and LCD control register. The basic structure contains a timing control which uses the basic frequency 32.768KHz or RC to generate the proper timing for different duty and display access. RE register is a command register for LCD driver. The LCD display (disable, enable, & blanking) is controlled by LCD_C and the driving duty and bias is decided by LCD_M. The display data is stored in data RAM which address and data access are controlled by registers IOCB and IOCC.
This specification is subject to change without further notice.
Mar.01.2005 (V1.1)23 of 36
EM78862B
8-Bit RISC Type Microprocessor
32.768KHz X'TAL or RC
LCD Timing Control
IOCB (Address) IOCC (Data)
LCD RAM
RE(LCD_C,LCD_M)
LCD Duty Control
Display Data Control
Bias Control
LCD COMMON Control
LCD SEGMENT Control
Vdd - Vlcd
COM
Fig. 12 LCD Driver Control Block
SEG
6.8.1 LCD Driver Control
6.8.1.1 LCD Driver, WDT Control (RE) Bit 7 0 Bit 0: Bit 6 /WDTE Bit 5 /WUP9H Bit 4 /WUP9L Bit 3 0 Bit 2 LCD_C2 Bit 1 LCD_C1 Bit 0 LCD_M
(LCD_M) LCD_M decides the methods, including duty.
Bit 1 ~ 2: (LCD_C#) decides the LCD display enable or blanking.
LCD_C2 0 0 0 0 1 1 1 1 LCD_C1 0 0 1 1 0 0 1 1 LCD_M 0 1 0 1 0 1 0 1 LCD Display Control Change duty Disable (turn off LCD) Blanking Blanking X X LCD display enable LCD display enable Duty 1/9 1/8 1/9 1/8 1/9 1/8 1/9 1/8 Bias 1/4 1/4 1/4 1/4 1/4 1/4 1/4 1/4
24 of 36
Mar.01.2005 (V1.1)
This specification is subject to change without further notice.
EM78862B
8-Bit RISC Type Microprocessor
6.8.2 LCD Display Area
The LCD display data is stored in the data RAM. The relation between data area and COM/SEG pin is as shown below.
SEGMENT SEG 0 SEG 1 : : SEG 58 SEG 59 Unused Unused Unused SEGMENT SEG 0 SEG 1 : : SEG 58 SEG 59 Unused : Unused X : X 7AH 7BH 7CH : 7FH IOCC (COM 8) 3AH 3BH 3CH : 3FH IOCB (Address) 40H 41H 1/9 DUTY Remarks IOCC (COM7 ~ COM0) IOCB (Address) 00H 01H 1/8 DUTY Remarks
6.8.2.1 IOCB (LCD RAM Display Address) Bit 7 0 Bit 7: Bit 6 LCDA6 Bit 5 LCDA5 Bit 4 LCDA4 Bit 3 LCDA3 Bit 2 LCDA2 Bit 1 LCDA1 Bit 0 LCDA0
Bit 0 ~ 6: (LCDA0~LCDA6) LCD address (up to 120) Unused. Fixed at `0'
NOTE Write only when LCD is enabled. Read/Write when disabled.
6.8.2.2 IOCC (LCD RAM Display Data) Bit 7 LCDD7 Bit 6 LCDD6 Bit 5 LCDD5 Bit 4 LCDD4 Bit 3 LCDD3 Bit 2 LCDD2 Bit 1 LCDD1 Bit 0 LCDD0
Bit 0 ~7: (LCDD0~LCDD7) LCD RAM display data register
This specification is subject to change without further notice.
Mar.01.2005 (V1.1)25 of 36
EM78862B
8-Bit RISC Type Microprocessor
6.8.3 LCD COM and SEG Signal
COM Signal: The number of COM pins varies according to the duty cycle in use as shown in the following table. In 1/8 Duty mode, COM8 must be opened. In 1/9 Duty mode, COM0 ~ COM8 pins must be used. Duty 1/8 1/9 COM0 O O COM1 O O COM2 O O COM3 O O COM4 O O COM5 O O COM6 O O COM7 O O COM8 X O
X = open, O = select
SEG Signal: The 60 segment signal pins are connected to the corresponding display RAM address 00h to 3Bh. When Duty mode is at 1/8, the required data address are only those from Com0 ~ Com7 (located within 00h ~ 3Bh). However, when Duty mode is at 1/9, all data address from Com0 ~ Com7 (located within 00h ~ 3Bh) and Com8 (located within 40h ~ 7Bh) are needed. When a bit of display RAM is 1, a select signal is sent to the corresponding segment pin, and when the bit is 0, a non-select signal is sent to the corresponding segment pin. COM, SEG, and Select/Non-Select signals are illustrated below.
frame com0
Vdd V1 V2 V3 VLCD Vdd V1 V2 V3 VLCD Vdd V1 V2 V3 VLCD Vdd V1 V2 V3 VLCD dark Vdd V1 V2 V3 VLCD light
com1
com2
seg
seg
Fig.13 LCD Waveform 1/4 Bias
26 of 36
Mar.01.2005 (V1.1)
This specification is subject to change without further notice.
EM78862B
8-Bit RISC Type Microprocessor
6.8.4 LCD Bias Control
6.8.4.1 IOCE (Bias Control Register) Bit 7 P9SH Bit 6 P9SL Bit 5 P6S Bit 4 BIAS3 Bit 3 BIAS2 Bit 2 BIAS1 Bit 1 0 Bit 0 SC
Bit 2 ~ 4: (BIAS1~BIAS3) Control bits used to choose LCD operation voltage. See Fig. 14 below for the applicable circuit.
LCD Operating Voltage 000 001 010 011 100 101 110 111 LCD Vop (VDD=5V) 3.0V 3.3V 3.7V 4.0V 4.4V 4.7V 4.8V 5.0V Ratio 0.60 VDD 0.66 VDD 0.74 VDD 0.82 VDD 0.87 VDD 0.93 VDD 0.96 VDD 1.00 VDD
Fig. 14 LCD Bias Circuit
This specification is subject to change without further notice.
Mar.01.2005 (V1.1)27 of 36
EM78862B
8-Bit RISC Type Microprocessor
6.9
Code Options
The EM78862B IC is equipped with one CODE option register that is not a part of the normal program memory. The option bits cannot be accessed during normal program execution. Bit 11 Bit 10 Bit 9 OSCSEL 1 0 Bit 8 0 Bit 7 1 Bit 6 1 Bit 5 1 Bit 4 0 Bit 3 0 Bit 2 Bit 1 Bit 0 0 MCLK 1
Bit 0, 5, 6, 7, & 10: Reserved. Set these bits to "1" Bit 2, 3, 4, 8, & 9: Reserved. Clear these bits to "0" Bit 1: (MCLK) Main Clock select 0: 3.579MHz 1: 1.7895MHz Bit 11: (OSCSEL) Oscillator select 0: RC mode 1: Crystal mode The RC or crystal oscillator is selected by OSCSEL bit of code option.
6.10 Instruction Set
Each instruction in the instruction set is a 13-bit word divided into an OP code and one or more operands. Normally, all instructions are executed within one single instruction cycle (one instruction consists of 2 oscillator periods). Unless the program counter is changed by instructions "MOV R2, A," "ADD R2, A," or by instructions of arithmetic or logic operation on R2 (e.g., "SUB R2, A," "BS(C) R2, 6," "CLR R2," etc.). Under this condition, the execution takes two instruction cycles. If for some reasons, the specification of the instruction cycle is not suitable for certain applications, try modifying the instruction as follows: a) Change one instruction cycle to consist of 4 oscillator periods. b) Execute within two instruction cycles, "JMP," "CALL," "RET," "RETL," & "RETI," or the conditional skip ("JBS," "JBC," "JZ," "JZA," "DJZ," & "DJZA") instructions which were tested to be true. Also execute within two instruction cycles the instructions that are written to the program counter. Furthermore, the instruction set has the following features: Every bit of any register can be set, cleared, or tested directly. The I/O register can be regarded as general register. That is, the same instruction can operate on I/O register. The symbol "R" in the instruction set represents a register designator that specifies which one of the registers (including operational registers and general purpose registers) is to be utilized by the instruction. "B" represents a bit field designator that selects the value for the bit, which is located in the register "R", and affects operation. "K" represents an 8 or 10-bit constant or literal value.
28 of 36
Mar.01.2005 (V1.1)
This specification is subject to change without further notice.
EM78862B
8-Bit RISC Type Microprocessor
INSTRUCTION BINARY 0 0000 0000 0000 0 0000 0000 0001 0 0000 0000 0010 0 0000 0000 0011 0 0000 0000 0100 0 0000 0000 rrrr 0 0000 0001 0000 0 0000 0001 0001 0 0000 0001 0010 0 0000 0001 0011 0 0000 0001 0100 0 0000 0001 rrrr 0 0000 0010 0000 0 0000 01rr rrrr 0 0000 1000 0000 0 0000 11rr rrrr 0 0001 00rr rrrr 0 0001 01rr rrrr 0 0001 10rr rrrr 0 0001 11rr rrrr 0 0010 00rr rrrr 0 0010 01rr rrrr 0 0010 10rr rrrr 0 0010 11rr rrrr 0 0011 00rr rrrr 0 0011 01rr rrrr 0 0011 10rr rrrr 0 0011 11rr rrrr 0 0100 00rr rrrr 0 0100 01rr rrrr 0 0100 10rr rrrr 0 0100 11rr rrrr 0 0101 00rr rrrr 0 0101 01rr rrrr 0 0101 10rr rrrr 0 0101 11rr rrrr 0 0110 00rr rrrr
1 2
HEX 0000 0001 0002 0003 0004 000r 0010 0011 0012 0013 0014 001r 0020 00rr 0080 00rr 01rr 01rr 01rr 01rr 02rr 02rr 02rr 02rr 03rr 03rr 03rr 03rr 04rr 04rr 04rr 04rr 05rr 05rr 05rr 05rr 06rr
MNEMONIC NOP DAA CONTW SLEP WDTC IOW R ENI DISI RET RETI CONTR IOR R TBL MOV R,A CLRA CLR R SUB A,R SUB R,A DECA R DEC R OR A,R OR R,A AND A,R AND R,A XOR A,R XOR R,A ADD A,R ADD R,A MOV A,R MOV R,R COMA R COM R INCA R INC R DJZA R DJZ R RRCA R
OPERATION No Operation Decimal Adjust A A CONT 0 WDT, Stop oscillator 0 WDT A IOCR Enable Interrupt Disable Interrupt [Top of Stack] PC [Top of Stack] PC, Enable Interrupt CONT A IOCR A R2+A R2, Bits 8~9 of R2 unchanged AR 0A 0R R-A A R-A R R-1 A R-1 R ARA ARR A&RA A&RR ARA ARR A+RA A+RR RA RR2 /R A /R ( R R+1 ( A R+1 ( R R-1 ( A, skip if zero R-1 ( R, skip if zero R(n) ( A(n-1), R(0) ( C, C ( A(7)
STATUS AFFECTED None C None T, P T, P None 1 None None None None None None 1 Z, C, DC None Z Z Z, C, DC Z, C, DC Z Z Z Z Z Z Z Z Z, C, DC Z, C, DC Z Z Z Z Z Z None None C
This instruction is applicable to IOC5 ~ IOC9, IOCA, IOCB, IOCC, IOCD, IOCE, & IOCF only. Source and destination must be the same. Mar.01.2005 (V1.1)29 of 36
This specification is subject to change without further notice.
EM78862B
8-Bit RISC Type Microprocessor
INSTRUCTION BINARY 0 0110 01rr rrrr 0 0110 10rr rrrr 0 0110 11rr rrrr 0 0111 00rr rrrr 0 0111 01rr rrrr 0 0111 10rr rrrr 0 0111 11rr rrrr 0 100b bbrr rrrr 0 101b bbrr rrrr 0 110b bbrr rrrr 0 111b bbrr rrrr 1 00kk kkkk kkkk 1 01kk kkkk kkkk 1 1000 kkkk kkkk 1 1001 kkkk kkkk 1 1010 kkkk kkkk 1 1011 kkkk kkkk 1 1100 kkkk kkkk 1 1101 kkkk kkkk 1 1110 0000 0010 1 1110 1000 kkkk 1 1111 kkkk kkkk
3 4
HEX 06rr 06rr 06rr 07rr 07rr 07rr 07rr 0xxx 0xxx 0xxx 0xxx 1kkk 1kkk 18kk 19kk 1Akk 1Bkk 1Ckk 1Dkk 1E02 1E8k 1Fkk
MNEMONIC RRC R RLCA R RLC R SWAPA R SWAP R JZA R JZ R BC R,b BS R,b JBC R,b JBS R,b CALL k JMP k MOV A,k OR A,k AND A,k XOR A,k RETL k SUB A,k INT PAGE k ADD A,k
OPERATION R(n) ( R(n-1), R(0) ( C, C ( R(7) R(n) ( A(n+1), R(7) ( C, C ( A(0) R(n) ( R(n+1), R(7) ( C, C ( R(0) R(0-3) ( A(4-7), R(4-7) ( A(0-3) R(0-3) ( R(4-7) R+1 ( A, skip if zero R+1 ( R, skip if zero 0 ( R(b) 1 ( R(b) if R(b)=0, skip if R(b)=1, skip PC+1 ( [SP], (Page, k) ( PC (Page, k) ( PC k(A A(k(A A&k(A A(k(A k ( A, [Top of Stack] ( PC k-A ( A PC+ 1 [SP], 001H ( PC k->R5(3:0) k+A ( A
STATUS AFFECTED C C C None None None None None 3 None 4 None None None None None Z Z Z None Z, C, DC None None Z, C, DC
This instruction is not recommended for RF operation. This instruction cannot operate under RF.
7
Absolute Maximum Ratings
RATING DC Supply Voltage Input Voltage Operating Temperature Range SYMBOL Vdd Vin Ta VALUE -0.3 to 6 -0.5 to Vdd +0.5 -40 to 85 UNIT V V C
30 of 36
Mar.01.2005 (V1.1)
This specification is subject to change without further notice.
EM78862B
8-Bit RISC Type Microprocessor
8
DC Electrical Characteristics
(Ta=0C ~ 70C, VDD=5V5%, VSS=0V)
Symbol IIL1 IIL2 VIH VIL VIHT VILT VIHX VILX VHscan VLscan VOH1 Parameter Input Leakage Current for input pins Input Leakage Current for bi-directional pins Input High Voltage Input Low Voltage Input High Threshold Voltage Input Low Threshold Voltage Clock Input High Voltage Clock Input Low Voltage Key scan Input High Voltage Key scan Input Low Voltage Output High Voltage (Port 6, 7, 8) (Port 9) VOL1 Vcom Vseg Vlcd IPH Output Low Voltage (Port6, 7, 8) (Port 9) Com voltage drop Segment voltage drop LCD drive reference voltage Pull-high current Power down current (SLEEP mode) Power down current (IDLE mode) RESET RESET OSCI OSCI Port 6 for key scan Port 6 for key scan IOH = -1.6mA IOH = -6.0mA IOL = 1.6mA IOL = 6.0mA Io=+/- 50 uA Io=+/- 50 uA Contrast adjustment Pull-high active input pin at VSS All input and I/O pin at VDD, output pin floating, WDT disabled All input and I/O pin at VDD, output pin floating, WDT disabled, LCD enabled CLK=32.768KHz, all input and I/O pin at VDD, output pin floating, WDT disabled, LCD enabled RESET=High, CLK=3.579MHz, output pin floating, LCD enabled 0.6VDD -10 Condition VIN = VDD, VSS VIN = VDD, VSS Min 0.8VDD VSS 2.0 3.5 3.5 0.8VDD 0.8VDD VSS VSS Type Max 1 1 VDD 0.2VDD 0.8 1.5 1.5 VDD VDD 0.2VDD 0.2VDD 2.9 3.8 VDD -15 Unit A A V V V V V V V V V V V V V V V A A
ISB1
-
1
4
ISB2
-
50
70
A
ISB3
Low clock current (GREEN mode) Operating supply current (NORMAL mode)
-
80
100
A
ICC
-
1.5
1.9
mA
This specification is subject to change without further notice.
Mar.01.2005 (V1.1)31 of 36
EM78862B
8-Bit RISC Type Microprocessor
(Ta=0C ~ 70C, VDD=3V5%, VSS=0V)
Symbol Parameter Condition Min Type Max Unit
ISB1
Power down current (SLEEP mode)
All input and I/O pin at VDD, output pin floating, WDT disabled
1
2
A
ISB2
Power down current (IDLE mode)
All input and I/O pin at VDD, output pin floating, WDT disabled, LCD enabled
25
35
A
ISB3
Low clock current (GREEN mode)
CLK=32.768KHz, all input and I/O pin at VDD, output pin floating, WDT disabled, LCD enabled
35
45
A
ICC
Operating supply current RESET=High, CLK=3.579MHz, output pin floating, LCD enable (NORMAL mode)
0.9
1.2
mA
9
AC Electrical Characteristics
(Ta=0C ~ 70C, VDD=5V, VSS=0V)
Symbol Dclk Tins Tdrh Twdt Parameter Input CLK duty cycle Instruction cycle time Device delay hold time Watchdog timer period Ta = 25C 32.768K 3.579M Conditions Min 45 Type 50 60 550 18 18 Max 55 Unit % s ns ms ms
Description OSC start up (32.768KHz) (3.579MHz PLL)
Symbol Tosc
Min --
Type
Max 400 10
Unit ms
32 of 36
Mar.01.2005 (V1.1)
This specification is subject to change without further notice.
EM78862B
8-Bit RISC Type Microprocessor
10 Timing Diagram
Fig. 15 AC Timing
This specification is subject to change without further notice.
Mar.01.2005 (V1.1)33 of 36
EM78862B
8-Bit RISC Type Microprocessor
11 Application Circuit
11.1 Application with Crystal Mode
Fig. 16. Application with Crystal Mode
34 of 36
Mar.01.2005 (V1.1)
This specification is subject to change without further notice.
EM78862B
8-Bit RISC Type Microprocessor
11.2 Application with RC Mode
Fig. 17. Application with RC Mode
This specification is subject to change without further notice.
Mar.01.2005 (V1.1)35 of 36
EM78862B
8-Bit RISC Type Microprocessor
36 of 36
Mar.01.2005 (V1.1)
This specification is subject to change without further notice.


▲Up To Search▲   

 
Price & Availability of EM78862B

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X